<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="{{=T.accepted_language or 'en'}}">
  <head>
    <title>{{=T('Tred Home')}}</title>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      {{include 'web2py_ajax.html'}}

      <link rel="stylesheet" media="screen,projection" type="text/css" href="{{=URL(request.application,'static','custom.css')}}" />
      <link rel="stylesheet" media="screen,projection" type="text/css" href="{{=URL(request.application,'static','shadowbox.css')}}" />

      <script type="text/javascript" src="{{=URL(request.application,'static','jquery-ui-1.8.2.custom.min.js')}}"></script>
      <script type="text/javascript" src="{{=URL(request.application,'static','utility.js')}}"></script>
      <script type="text/javascript" src="{{=URL(request.application,'static','shadowbox.js')}}"></script>
      <script type="text/javascript" src="{{=URL(request.application,'static','ajaxupload.js')}}"></script>
      <script type="text/javascript" src="{{=URL(request.application,'static','indexGlobals.js')}}"></script>
      <script type="text/javascript" src="{{=URL(request.application,'static','indexShadowBox.js')}}"></script>
      <script type="text/javascript" src="{{=URL(request.application,'static','indexAjax.js')}}"></script>
      <script type="text/javascript" src="{{=URL(request.application,'static','indexUtil.js')}}"></script>

  </head>
  <body>

    <script type="text/javascript">

        Shadowbox.init( { enableKeys: false,
                          modal: true } );
 
        addShadowboxKeyPressHandlers();

        globals.applicationName = '{{=request.application}}';

        globals.maxTips = {{=treeInfo['maxTips']}};

    </script>

    <div class='windowWidth'>
        <div class='bottomMargin2 fLeft green pageHeaderText'>{{=T('TRee EDitor Home')}}</div>

        <div class='fRight orange'>
            {{if not auth.user:}}
                <div class='center smallText'>
                    <a href="{{=URL(r=request,f='user/login')}}">{{=T('login')}}</a> <span class='green'>|</span>
                    <a href="{{=URL(r=request,f='user/register')}}">{{=T('register')}}</a> <span class='green'>|</span>
                    <a href="{{=URL(r=request,f='user/request_reset_password')}}">{{=T('lost password')}}</a>
                </div>
            {{else:}}
                <div class='center smallText green'> Hi, {{=auth.user.first_name}}</div>
                <div class='center smallText'>
                    <a href="{{=URL(r=request,f='user/logout')}}">{{=T('logout')}}</a> <span class='green'>|</span>
                    <a href="{{=URL(r=request,f='user/change_password')}}">{{=T('change password')}}</a> <span class='green'>|</span>
                    <a href="{{=URL(r=request,f='user/profile')}}">{{=T('edit profile')}}</a>
                </div>
            {{pass}}
        </div>
        
        <div class="clear"></div>
    </div>

    <div id="treeListHeader" class="width75 bottomBorder fCenter">
        <!-- <div class='fLeft rightMargin1'>Your trees</div>
        <div class='fRight smallText'>
            <a href="javascript:void(0);" onclick="shadowboxAddNewick();">Add Newick</a>
        </div>
        <div class='clear'></div> -->
    </div>
        
    <div class="width75 fCenter greenBackground white">
        <div class="leftMargin10 center fLeft width30">name</div>
        <div class="center fLeft width60">comments</div>
        <div class='clear'></div>
    </div>
    <div id='sourceTrees' class='width75 fCenter'></div> 
   
     
    <script type="text/javascript">

        window.onload = indexWindowOnLoad;
 
        {{for id in treeInfo['source'].keys():}}
            displayTreeInfo( '{{=id}}', '{{=treeInfo['source'][id]['name']}}', '{{=treeInfo['source'][id]['comment']}}', 'sourceTrees' );
        {{pass}}       

    </script>

    
   </body>
</html>
